package com.manager.model;

import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

import java.math.BigDecimal;

@Entity
@Table(name="tb_message_specific")
public class MessageSpecific extends AllId{

    private String resourceIp;

    private String resourcePort;

    private String targetIp;

    private String targetPort;

    private BigDecimal byteLength;

    private String protocol;

    private String threeProtocol;

    private Message message;

    @ManyToOne(fetch = FetchType.LAZY)
    @Cascade(CascadeType.PERSIST)
    public Message getMessage() {
        return message;
    }

    public void setMessage(Message message) {
        this.message = message;
    }

    public String getResourceIp() {
        return resourceIp;
    }

    public void setResourceIp(String resourceIp) {
        this.resourceIp = resourceIp;
    }

    public String getResourcePort() {
        return resourcePort;
    }

    public void setResourcePort(String resourcePort) {
        this.resourcePort = resourcePort;
    }

    public String getProtocol() {
        return protocol;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public String getThreeProtocol() {
        return threeProtocol;
    }

    public void setThreeProtocol(String threeProtocol) {
        this.threeProtocol = threeProtocol;
    }

    public String getTargetIp() {
        return targetIp;
    }

    public void setTargetIp(String targetIp) {
        this.targetIp = targetIp;
    }

    public String getTargetPort() {
        return targetPort;
    }

    public void setTargetPort(String targetPort) {
        this.targetPort = targetPort;
    }

    public BigDecimal getByteLength() {
        return byteLength;
    }

    public void setByteLength(BigDecimal byteLength) {
        this.byteLength = byteLength;
    }
}
